ndp: Allow NS loopback for master iface
This commit modifies handle_solicit() in ndp.c to correct IPv6 relay
handling of Neighbor Solicitation (NS) requests when no upstream
solicitation is received.
Background: In IPv6 relay mode, odhcpd discovers local devices only upon
receiving upstream NS packets. If no upstream NS arrives (e.g. because the
upstream router’s neighbor cache is still valid or no solicitation was
ever sent), OpenWrt may attempt neighbor resolution via the master (WAN)
interface instead of the LAN, leaving local devices undiscoverable and
breaking connectivity.
- When an NS packet is sent by the host's master interface, do not
immediately return; instead continue searching slave interfaces for the
target neighbor.
- When odhcpd responds to NS packets, add a check to prevent replying to
NS packets that were sent by the host itself.
Signed-off-by: Haoyi Ci [email protected]
Link: https://github.com/openwrt/odhcpd/pull/240
Signed-off-by: Álvaro Fernández Rojas <[email protected]>